package com.oa.xinxi.biz;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.oa.xinxi.dao.DepMapper;
import com.oa.xinxi.entity.Dep;

/**
 * @author xmp
 *部门CRUD
 */
@Service
public class DepBiz {
	@Resource
	private DepMapper depMapper;
	public void save(Dep dep) {
		depMapper.insertSelective(dep);
	}
	public void deleteById(Integer id) {
		depMapper.deleteByPrimaryKey(id);
	}
	public void update(Dep dep) {
		depMapper.updateByPrimaryKeySelective(dep);
	}
	public Dep findById(Integer id) {
		return depMapper.selectByPrimaryKey(id);
	}
	public List<Dep> findAll() {
		return depMapper.findAll();
	}
}
